Virtualization technologies are becoming prevalent in the market place. At least some of these technologies provide a virtual hardware abstraction to guest operating systems, and allow them to run in virtual machines in a functionally isolated environment on a host computer without being modified. Virtualization allows one or more virtual (guest) machines to run on a single physical (host) computer, providing functional and performance isolation for processor, memory, storage, etc.
As is well known in the field of computer science, a virtual machine is an abstraction—a “virtualization”—of an actual physical computer system. FIG. 1 shows one possible arrangement of a computer system (computer system 700) that implements virtualization. As shown in FIG. 1, virtual machine or “guest” 200 is installed on a “host platform,” or simply “host,” which includes system hardware, that is, hardware platform 100, and one or more layers or co-resident components comprising system-level software, such as an operating system or similar kernel, or a virtual machine monitor or hypervisor 201 (see below), or some combination of these. The system hardware typically includes one or more processors 110, memory 130, some form of mass storage 140, and various other devices 170.
Each virtual machine 200 will typically have both virtual system hardware 211 and guest system software 202. The virtual system hardware 211 typically includes at least one virtual CPU, virtual memory 230, at least one virtual disk 240, and one or more virtual devices 270. Note that a disk—virtual or physical—is also a “device,” but is usually considered separately because of the important role of the disk. All of the virtual hardware components of the virtual machine may be implemented in software using known techniques to emulate the corresponding physical components. The guest system software includes guest operating system (OS) 220 and drivers 224 as needed for the various virtual devices 270.
Note that a single virtual machine 200 may be configured with more than one virtualized processor. To permit computer systems to scale to larger numbers of concurrent threads, systems with multiple CPUs have been developed. These symmetric multi-processor (SMP) systems are available as extensions of the PC platform and from other vendors. Essentially, an SMP system is a hardware platform that connects multiple processors to a shared main memory and shared I/O devices. Virtual machines may also be configured as SMP virtual machines. FIG. 1, for example, illustrates multiple virtual processors 210-0, 210-1, . . . , 210-m (VCPU0, VCPU1, . . . , VCPUm) within virtual machine 200.
Yet another configuration is found in a so-called “multi-core” host architecture, in which more than one physical CPU is fabricated on a single chip, with its own set of functional units (such as a floating-point unit and an arithmetic/logic unit ALU), and can execute threads independently; multi-core processors typically share only very limited resources, such as some cache. Still another configuration that provides for simultaneous execution of multiple threads is referred to as “simultaneous multi-threading,” in which more than one logical CPU (hardware thread) operates simultaneously on a single chip, but in which the logical CPUs flexibly share some resource such as caches, buffers, functional units, etc. One or more embodiments of this invention may be used regardless of the type—physical and/or logical—or number of processors included in a virtual machine.
In many cases applications 260 running on virtual machine 200 will function as they would if run on a “real” computer, even though the applications are running at least partially indirectly, that is via guest O/S 220 and virtual processor(s). Executable files will be accessed by the guest O/S from virtual disk 240 or virtual memory 230, which will be portions of the actual physical disk 140 or memory 130 allocated to that virtual machine. Once an application is installed within the virtual machine, the guest O/S retrieves files from the virtual disk just as if the files had been stored as the result of a conventional installation of the application. The design and operation of virtual machines are well known in the field of computer science.
Some interface is generally required between the guest software within a virtual machine and the various hardware components and devices in the underlying hardware platform. This interface—which may be referred to generally as “virtualization software”—may include one or more software components and/or layers, possibly including one or more of the software components known in the field of virtual machine technology as “virtual machine monitors” (VMMs), “hypervisors” 201, or “virtualization kernels.” Because virtualization terminology has evolved over time and has not yet become fully standardized, these terms do not always provide clear distinctions between the software layers and components to which they refer. For example, the term “hypervisors” 201 is often used to describe both a VMM and a kernel together, either as separate but cooperating components or with one or more VMMs incorporated wholly or partially into the kernel itself; however, the term “hypervisors” 201 is sometimes used instead to mean some variant of a VMM alone, which interfaces with some other software layer(s) or component(s) to support the virtualization. Moreover, in some systems, some virtualization code is included in at least one “superior” virtual machine to facilitate the operations of other virtual machines. Furthermore, specific software support for virtual machines may be included in the host OS itself. Unless otherwise indicated, one or more embodiments of the invention described herein may be used in virtualized computer systems having any type or configuration of virtualization software.
FIG. 1 shows virtual machine monitors that appear as separate entities from other components of the virtualization software. Furthermore, some software components used to implement one or more embodiments of the invention are shown and described as being within a “virtualization layer” located logically between all virtual machines and the underlying hardware platform and/or system-level host software. This virtualization layer can be considered part of the overall virtualization software, although it would be possible to implement at least part of this layer in specialized hardware. The illustrated embodiments are given only for the sake of simplicity and clarity and by way of illustration—as mentioned above, the distinctions are not always so clear-cut. Again, unless otherwise indicated or apparent from the description, it is to be assumed that one or more embodiments of the invention can be implemented anywhere within the overall structure of the virtualization software, and even in systems that provide specific hardware support for virtualization.
The various virtualized hardware components in the virtual machine, such as virtual CPU(s) 210-0, 210-1, . . . , 210-m, virtual memory 230, virtual disk 240, and virtual device(s) 270, are shown as being part of virtual machine 200 for the sake of conceptual simplicity. In actuality, these “components” are usually implemented as software emulations 235 included in the VMM.
Different systems may implement virtualization to different degrees—“virtualization” generally relates to a spectrum of definitions rather than to a bright line, and often reflects a design choice with respect to a trade-off between speed and efficiency on the one hand and isolation and universality on the other hand. For example, “full virtualization” is sometimes used to denote a system in which no software components of any form are included in the guest other than those that would be found in a non-virtualized computer; thus, the guest O/S could be an off-the-shelf, commercially available OS with no components included specifically to support use in a virtualized environment.
In contrast, another term, which has yet to achieve a universally accepted definition, is that of “para-virtualization.” As the term implies, a “para-virtualized” system is not “fully” virtualized, but rather the guest is configured in some way to provide certain features that facilitate virtualization. For example, the guest in some para-virtualized systems is designed to avoid hard-to-virtualize operations and configurations, such as by avoiding certain privileged instructions, certain memory address ranges, etc. As another example, many para-virtualized systems include an interface within the guest that enables explicit calls to other components of the virtualization software.
For some, the term para-virtualization implies that the guest O/S (in particular, its kernel) is specifically designed to support such an interface. According to this view, having, for example, an off-the-shelf version of Microsoft Windows XP™ as the guest O/S would not be consistent with the notion of para-virtualization. Others define the term para-virtualization more broadly to include any guest O/S with any code that is specifically intended to provide information directly to any other component of the virtualization software. According to this view, loading a module such as a driver designed to communicate with other virtualization components renders the system para-virtualized, even if the guest O/S as such is an off-the-shelf, commercially available OS not specifically designed to support a virtualized computer system. Unless otherwise indicated or apparent, embodiments of this invention are not restricted to use in systems with any particular “degree” of virtualization and are not to be limited to any particular notion of full or partial (“para-”) virtualization.
In addition to the sometimes fuzzy distinction between full and partial (para-) virtualization, two arrangements of intermediate system-level software layer(s) are in general use—a “hosted” configuration and a non-hosted configuration (which is shown in FIG. 1). In a hosted virtualized computer system, an existing, general-purpose operating system forms a “host” OS that is used to perform certain input/output (I/O) operations, alongside and sometimes at the request of the VMM.
As illustrated in FIG. 1, in many cases, it may be beneficial to deploy VMMs on top of a software layer—kernel 600—constructed specifically to provide support for the virtual machines. This configuration is frequently referred to as being “non-hosted.” Kernel 600 also handles any other applications running on it that can be separately scheduled, as well as a console operating system that, in some architectures, is used to boot the system and facilitate certain user interactions with the virtualization software.
Note that kernel 600 is not the same as the kernel that will be within guest O/S 220—as is well known, every operating system has its own kernel. Note also that kernel 600 is part of the “host” platform of the virtual machine/VMM as defined above even though the configuration shown in FIG. 1 is commonly termed “non-hosted;” moreover, the kernel may be both part of the host and part of the virtualization software or “hypervisor” 201. The difference in terminology is one of perspective and definitions that are still evolving in the art of virtualization.
As will be understood by those of ordinary skill in the relevant art, computer virtualization enables host hardware 100 to be used as a pool of interchangeable, commodity resources for running virtual machines 200. The interchangeability of resources enables information services to be flexibly managed allowing for superior performance, availability, and scalability over a non-virtualized environment. As requirements for additional information services scale, virtualization meets this need by enabling commodity resources to be added and removed on a scale that is commensurate with current resource usage.
As resources are added to a deployment there is usually a corresponding manageability cost. A virtualized environment helps to contain the growth in manageability cost by decoupling the customizations specific to an information service from the host configuration. For example, the amount of required CPU 110 and memory resources 130 is a specification of the virtual machine 200 rather than the host. As a result, the range of configuration variation between hosts in a virtualized environment is smaller than that in a non-virtualized environment. Scaling hardware resources 100 to meet resource requirements is more tractable in a virtualized environment since the growth in manageability cost is contained.
Under powerful virtualization software interfaces between virtual machines 200 and the various hardware components and devices in the underlying host platform, a rich set of configuration controls exist providing mechanisms enabling administrators to reach robust levels of performance, availability, scalability, and manageability. As noted above, such host level “virtualization software” can be known in the field of virtual machine technology as a “hypervisors” 201, “virtual machine monitor,” “virtualization kernel” or other labels. For ease of discussion, such components will be herein referred to as hypervisors 201, although the naming is not important.
In any case, the costs associated with these mechanisms entail additional controls that enable an administrator to select an appropriate balance between benefit and cost. Hence, some of the reduction in configuration complexity gained by virtualization is returned in exchange for needing to configure the hypervisor 201 to improve the runtime characteristics of the virtualized information services. In other words, a significant overhead can be involved in the configuration of feature-rich hypervisors 201.
It would be desirable to ensure the benefits of scaling hardware resources 100 are not lost to growing manageability costs when operating with a powerful hypervisor 201, particularly within the context of the growth in configuration complexity as more hypervisor 201 instances are added to a deployment.